package com.generic.demo1;

/**
 * @ClassName Cat
 * @Description TODO
 * @Author Kx
 * @Date 2025/3/25 18:58
 * @Version 1.0
 */
public class Cat extends Pet implements Call{
    private String name;
    private String trait; // 性格

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Cat(String name,String trait) {
        this.name = name;
        this.trait = trait;
    }

    @Override
    public String getTrait() {
        return trait;
    }

    @Override
    public void setTrait(String trait) {
        this.trait = trait;
    }

    /***
     * @author: kx
     * @date: 2025/3/25 19:11
     * @description: 猫叫的方法
    */
    @Override
    public void call() {
        System.out.println(name + "叫: 喵喵喵");
    }
}
